package cn.iocoder.yudao.module.system.controller.admin.auth.vo;

import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Schema(description = "管理后台 - 注册企业用户")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthRegisterReqVO {

    @Schema(description = "认证类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1-企业版；2-个人版")
//    @NotNull(message = "认证类型不能为空")
    private Integer authType;


    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三的企业")
    @NotEmpty(message = "名称不能为空")
    @Length(min = 4, max = 32, message = "企业名称长度为 4-32位")
    private String name;

    @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "联系人不能为空")
    @Length(min = 2, max = 10, message = "联系人长度为 2-10位")
    private String contactName;

    @Schema(description = "联系手机", requiredMode = Schema.RequiredMode.REQUIRED, example = "18012345678")
    @NotEmpty(message = "联系手机不能为空")
    @Length(min = 11, max = 16, message = "联系手机长度为 11-16位")
    private String contactMobile;

    @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "admin")
    @NotEmpty(message = "登录账号不能为空")
    @Length(min = 4, max = 16, message = "账号长度为 4-16 位")
    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
    private String username;

    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
    @NotEmpty(message = "密码不能为空")
    @Length(min = 4, max = 16, message = "密码长度为 4-16 位")
    private String password;

    @Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
    @NotEmpty(message = "验证码不能为空")
    @Length(min = 4, max = 6, message = "验证码长度为 4-6 位")
    private String code;

}